// 房间路由
const roomType = require('express').Router();

// 创建房间
roomType.post('/', require('./actions/roomType/create'));
// 查询所有房间信息
roomType.get('/', require('./actions/roomType/find'));
// 根据id删除房间信息
roomType.delete('/:id', require('./actions/roomType/findByIdAndDelete'));
// 根据id修改房间信息
roomType.put('/:id', require('./actions/roomType/findByIdAndUpdate'));
// 根据房间名称查询房间信息
roomType.get('/exist', require('./actions/roomType/findByTitle'));
// 根据房间id查询房间信息
roomType.get('/:id', require('./actions/roomType/findById'));

// 导出路由
module.exports = roomType;